package cn.tedu.tmall.common.pojo.po;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@Document(indexName = "content_article")
public class ArticleSerchPO implements Serializable {

    /**
     * 数据ID
     */
    @Id
    private Long id;

    /**
     * 作者ID
     */
    private Long authorId;

    /**
     * 作者名字
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String authorName;

    /**
     * 类别ID
     */
    private Long categoryId;

    /**
     * 类别名称
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String categoryName;

    /**
     * 标题
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String title;

    /**
     * 摘要
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String brief;

    /**
     * 封面图
     */
    @Field(type = FieldType.Keyword)
    private String coverUrl;

    /**
     * 关键词列表，各关键词使用英文的逗号分隔
     */
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String keywords;

    /**
     * 排序序号
     */
    private Integer sort;

    /**
     * 顶数量
     */
    private Integer upCount;

    /**
     * 踩数量
     */
    private Integer downCount;

    /**
     * 浏览量
     */
    private Integer clickCount;

    /**
     * 评论量
     */
    private Integer commentCount;

}
